// 小程序状态栏信息
const SYSTEM_INFO = uni.getSystemInfoSync();
export const getStatusBarHeight = () => SYSTEM_INFO.statusBarHeight || 15;

// 小程序胶囊按钮信息
export const getTitleBarHeight = () => {
  if (uni.getMenuButtonBoundingClientRect) {
    const {
      top,
      height
    } = uni.getMenuButtonBoundingClientRect();
    const titleBarHeight = height + (top - getStatusBarHeight()) * 2;
    return titleBarHeight
  } else {
    return 50
  }
}
//底部tabbar高度
export const getTabBrHeight = () => {
  if (SYSTEM_INFO.platform === 'ios' || SYSTEM_INFO.platform === 'android') {
    return 70
  }
  // console.log('platform',SYSTEM_INFO.platform);
  return 30;
}
export const getNavBarHeight = () => getStatusBarHeight() + getTitleBarHeight()